#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: api06_subtask.py 
@version:
@time: 2022/03/22 
"""
from TapClientCore.T02_tm_api.v2_api.v2_api_base import *


class Api06SubTaskUrl(V2ApiUrlBase):
    url_sub_task = api_joint(V2ApiUrlBase().server, SubTask, byTaskId)


class Api06SubTask(V2ApiBase):

    def get_subTask_by_task_id(self, task_id):
        _filter = {"limit": 50, "skip": 0}
        response = self.tapclient(
            self.get,
            api_joint(Api06SubTaskUrl.url_sub_task, task_id) + self.access_token
            + self.filter(_filter)
        )
        return response
